package com.xingchen.loveparttimejob.model.pojo;

import java.sql.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * @author lwj
 * @date 2024-12-03
 * @vesion 1.0.0
 */
public class JobRelease {
    /**
     * 职位状态编号
     */
    private int jrId;
    /**
     * 用户编号（外键）
     */
    private int uId;
    /**
     * 职位编号（外键）
     */
    private int jiId;
    /**
     * 浏览数
     */
    private int clickNumber;
    /**
     * 职位状态
     */
    private int status;
    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 是否删除
     */
    private int state;
    /**
     * 最后更新日期
     */
    private Date updatedAt;

    // 构造方法
    public JobRelease() {}
    public JobRelease(int jrId, int uId, int jiId, int clickNumber, int status, Date createTime, int state, Date updatedAt) {
        this.jrId = jrId;
        this.uId = uId;
        this.jiId = jiId;
        this.clickNumber = clickNumber;
        this.status = status;
        this.createTime = createTime;
        this.state = state;
        this.updatedAt = updatedAt;
    }

    /**
     * 反射中使用到
     * @return
     */
    public Map<String,String> getMapping(){
        Map<String,String> map = new HashMap<>();
        map.put("jrId","jr_id");
        map.put("uId","u_id");
        map.put("jiId","ji_id");
        map.put("clickNumber","click_number");
        map.put("status","status");
        map.put("createTime","create_time");
        map.put("state","state");
        map.put("updatedAt","updated_at");
        return map;
    }

    // 属性
    public int getJrId() {
        return jrId;
    }

    public void setJrId(int jrId) {
        this.jrId = jrId;
    }

    public int getuId() {
        return uId;
    }

    public void setuId(int uId) {
        this.uId = uId;
    }

    public int getJiId() {
        return jiId;
    }

    public void setJiId(int jiId) {
        this.jiId = jiId;
    }

    public int getClickNumber() {
        return clickNumber;
    }

    public void setClickNumber(int clickNumber) {
        this.clickNumber = clickNumber;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public Date getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }

    /**
     * 打印职位发布表
     * @return
     */
    @Override
    public String toString() {
        return "JobRelease{" +
                "jrId=" + jrId +
                ", uId=" + uId +
                ", jiId=" + jiId +
                ", clickNumber=" + clickNumber +
                ", status=" + status +
                ", createTime=" + createTime +
                ", state=" + state +
                ", updatedAt=" + updatedAt +
                '}';
    }
}
